Integrand size = 35, antiderivative size = 142 \[ \int \frac {A+B \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx=\frac {\sqrt {2} (A-B) \text {arctanh}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}} \]
[Out]
Time = 0.54 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {4107, 4098, 3893, 212} \[ \int \frac {A+B \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx=\frac {\sqrt {2} (A-B) \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}-\frac {2 (A-3 B) \sin (c+d x) \sqrt {\sec (c+d x)}}{3 d \sqrt {a \sec (c+d x)+a}}+\frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a \sec (c+d x)+a}} \]
[In]
[Out]
Rule 212
Rule 3893
Rule 4098
Rule 4107
Rubi steps \begin{align*} \text {integral}& = \frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {2 \int \frac {-\frac {1}{2} a (A-3 B)+a A \sec (c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx}{3 a} \\ & = \frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+(A-B) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx \\ & = \frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}-\frac {(2 (A-B)) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d} \\ & = \frac {\sqrt {2} (A-B) \text {arctanh}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}} \\ \end{align*}
Time = 0.29 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.93 \[ \int \frac {A+B \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx=\frac {\left (2 (-A+3 B+A \cos (c+d x)) \sqrt {1-\sec (c+d x)}-3 \sqrt {2} (A-B) \arctan \left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right ) \sqrt {\sec (c+d x)}\right ) \tan (c+d x)}{3 d \sqrt {-((-1+\sec (c+d x)) \sec (c+d x))} \sqrt {a (1+\sec (c+d x))}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(273\) vs. \(2(119)=238\).
Time = 4.26 (sec) , antiderivative size = 274, normalized size of antiderivative = 1.93
method | result | size |
parts | \(\frac {A \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (3 \sqrt {2}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}+3 \sqrt {2}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}\, \sec \left (d x +c \right )+2 \sin \left (d x +c \right )-2 \tan \left (d x +c \right )\right )}{3 d a \left (\cos \left (d x +c \right )+1\right ) \sec \left (d x +c \right )^{\frac {3}{2}}}-\frac {B \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (\sqrt {2}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}+2 \cot \left (d x +c \right )-2 \csc \left (d x +c \right )\right )}{d a \sqrt {\sec \left (d x +c \right )}}\) | \(274\) |
default | \(\frac {\sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (3 A \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {2}-3 B \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {2}+3 A \sqrt {2}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}\, \sec \left (d x +c \right )-3 B \sqrt {2}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}\, \sec \left (d x +c \right )+2 A \sin \left (d x +c \right )-2 A \tan \left (d x +c \right )+6 B \tan \left (d x +c \right )\right )}{3 d a \left (\cos \left (d x +c \right )+1\right ) \sec \left (d x +c \right )^{\frac {3}{2}}}\) | \(303\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 354, normalized size of antiderivative = 2.49 \[ \int \frac {A+B \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx=\left [-\frac {\frac {3 \, \sqrt {2} {\left ({\left (A - B\right )} a \cos \left (d x + c\right ) + {\left (A - B\right )} a\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} + \frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right )}{\sqrt {a}} - \frac {4 \, {\left (A \cos \left (d x + c\right )^{2} - {\left (A - 3 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{6 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}, -\frac {3 \, \sqrt {2} {\left ({\left (A - B\right )} a \cos \left (d x + c\right ) + {\left (A - B\right )} a\right )} \sqrt {-\frac {1}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \sqrt {\cos \left (d x + c\right )}}{\sin \left (d x + c\right )}\right ) - \frac {2 \, {\left (A \cos \left (d x + c\right )^{2} - {\left (A - 3 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{3 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}\right ] \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {A + B \sec {\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \sec ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 387 vs. \(2 (119) = 238\).
Time = 0.58 (sec) , antiderivative size = 387, normalized size of antiderivative = 2.73 \[ \int \frac {A+B \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx=-\frac {\frac {{\left (3 \, \sqrt {2} \cos \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) - 3 \, \sqrt {2} \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) \sin \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) - 3 \, \sqrt {2} \log \left (\cos \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) + 1\right ) + 3 \, \sqrt {2} \log \left (\cos \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} - 2 \, \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) + 1\right ) - 2 \, \sqrt {2} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 3 \, \sqrt {2} \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )\right )} A}{\sqrt {a}} + \frac {3 \, {\left (\sqrt {2} \log \left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - \sqrt {2} \log \left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - 4 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} B}{\sqrt {a}}}{6 \, d} \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx=\int { \frac {B \sec \left (d x + c\right ) + A}{\sqrt {a \sec \left (d x + c\right ) + a} \sec \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}}{\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \]
[In]
[Out]